package com.cskaoyan.controller;

import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.service.CollectService;
import com.fasterxml.jackson.databind.ser.Serializers;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/admin/collect")
public class CollectController {
    @Autowired
    CollectService collectService;

    @RequiresPermissions("admin:collect:list")
    @GetMapping("/list")
    public Object list(
            Integer userId,
            Integer valueId,
            Integer page,
            Integer limit,
            String sort,
            String order
    ){
       Map<String,Object> map =  collectService.querySelective(userId,valueId,page,limit,sort,order);
       return BaseRespVo.success(map);
    }


}
